<template>
    <view @tap="__e" class="mask data-v-5e04b9ce" :data-event-opts="[['tap', [['cancel', ['$event']]]]]">
        <view @tap.stop.prevent="__e" class="mask-content data-v-5e04b9ce" :data-event-opts="[['tap', [['', ['$event']]]]]">
            <view @tap="__e" class="close data-v-5e04b9ce" :data-event-opts="[['tap', [['cancel', ['$event']]]]]">
                <image class="data-v-5e04b9ce" src="https://img121.7dun.com/yuanqimali/kaishang/zsClose.png"></image>
            </view>
            <view class="wucha data-v-5e04b9ce">由于数据反馈会有延迟，榜单呈现时间会有误差。</view>
            <view class="tag-list data-v-5e04b9ce">
                <view @tap="__e" :class="['item', 'data-v-5e04b9ce', tag === 'all' ? 'actived' : '']" :data-event-opts="[['tap', [['setTag', ['all']]]]]">全部</view>
                <view @tap="__e" class="data-v-5e04b9ce" :data-event-opts="[['tap', [['setTag', ['$0'], [[['levelids', '', i]]]]]]]" v-for="(k, i) in levelids" :key="i">
                    <view class="data-v-5e04b9ce" v-for="(y, n) in renyi_sku_level_list" :key="n">
                        <text :class="['item', 'data-v-5e04b9ce', tag === k ? 'actived' : '']" v-if="k - 1 == n">{{ '' + y.title + '' }}</text>
                    </view>
                </view>
            </view>
            <scroll-view @scrolltolower="__e" class="scroll-view data-v-5e04b9ce" :data-event-opts="[['scrolltolower', [['fetchList', ['$event']]]]]" :scrollY="true">
                <view class="list-scope data-v-5e04b9ce">
                    <view class="item-scope data-v-5e04b9ce" hoverClass="hover" v-if="tag == 'all' || tag == item[$orig].level" v-for="(item, index) in $root.l0" :key="index">
                        <view class="sku-c data-v-5e04b9ce" v-if="item1 == item[$orig].level" v-for="(item1, index1) in levelids" :key="index1">
                            <image class="shang-image data-v-5e04b9ce" src="https://img121.7dun.com/20230207NewImg/wuxianshang/ssr.png" v-if="item1 == 4"></image>

                            <block v-else>
                                <image class="shang-image data-v-5e04b9ce" src="https://img121.7dun.com/20230207NewImg/wuxianshang/ur.png" v-if="item1 == 5"></image>
                                <block v-else>
                                    <image class="shang-image data-v-5e04b9ce" src="https://img121.7dun.com/20230207NewImg/wuxianshang/sp.png" v-if="item1 == 6"></image>
                                    <block v-else>
                                        <image
                                            class="tuanzhan-image data-v-5e04b9ce"
                                            src="https://img121.7dun.com/20230207NewImg/wuxianshang/tuanzhanIcon.png"
                                            v-if="item1 == 7"
                                        ></image>
                                    </block>
                                </block>
                            </block>
                        </view>

                        <view class="sku-r data-v-5e04b9ce">
                            <image class="sku-image data-v-5e04b9ce" :src="item[$orig].sku.thumb"></image>
                        </view>

                        <view class="sku-s data-v-5e04b9ce">
                            <view class="data-v-5e04b9ce">
                                <view class="sku-title data-v-5e04b9ce">{{ item[$orig].sku.title }}</view>
                                <view class="time data-v-5e04b9ce">
                                    {{ item.g0 }}
                                    <text class="data-v-5e04b9ce" style="color: #646155; margin-left: 30rpx" v-if="item[$orig].open_index">
                                        {{ '第' + item[$orig].open_index + '发' }}
                                    </text>
                                </view>
                            </view>
                            <view class="total data-v-5e04b9ce">x < text class="data-v-5e04b9ce">{{ item[$orig].total }}</view>
                        </view>

                        <view class="user-c data-v-5e04b9ce">
                            <image class="headimg data-v-5e04b9ce" :src="item[$orig].user && item[$orig].user.headimg"></image>
                            <view class="user-name data-v-5e04b9ce">
                                <text class="name data-v-5e04b9ce">{{ item[$orig].user && item[$orig].user.name }}</text>
                            </view>
                        </view>
                    </view>
                    <no-data @__l="__l" class="data-v-5e04b9ce" title="暂无榜单记录" vueId="047c1ca9-1" v-if="$root.g1"></no-data>
                </view>
                <view class="data-v-5e04b9ce" style="height: 300rpx; color: #646464; font-size: 26rpx; text-align: center">中赏记录只展示最新3天</view>
            </scroll-view>
        </view>
    </view>
</template>

<script>
import noData from '@/components/NoData/NoData';
import tabBar from '@/components/TabBar/tabBar';
(global.webpackJsonp = global.webpackJsonp || []).push([
    ['pages/renyimen/components/RecordList'],
    {
        '02a0': function (t, n, e) {
            'use strict';

            (function (t) {
                Object.defineProperty(n, '__esModule', {
                    value: true
                });
                n.default = void 0;
                var e = {
                    components: {},
                    data: function () {
                        return {
                            renyi_sku_level_list: [],
                            levelids: [],
                            isInit: false,
                            list: [],
                            total: 0,
                            page: 1,
                            perPage: 10,
                            tag: 'all'
                        };
                    },
                    props: {
                        info: {
                            type: Object
                        },
                        room: {
                            type: Object
                        }
                    },
                    computed: {
                        tagList: function () {
                            return this.info.skus
                                .filter(function (t) {
                                    return 0 === t.shang_type;
                                })
                                .map(function (t) {
                                    return {
                                        title: t.shang_title,
                                        id: t.id
                                    };
                                });
                        }
                    },
                    watch: {
                        payTotal: function () {
                            this.initOrder();
                        },
                        tag: function () {
                            this.page = 1;
                            this.list = [];
                            this.fetchList();
                        }
                    },
                    created: function () {
                        this.initData();
                        this.homeConfig();
                        console.log(this.info);
                    },
                    methods: {
                        homeConfig: function () {
                            var that = this;
                            this.$http('/renyi/home/config', 'GET').then(function (n) {
                                that.levelids = n.data.setting.renyi_record.level_ids;
                                that.renyi_sku_level_list = n.data.setting.renyi_sku_level.list;
                            });
                        },
                        setTag: function (t) {
                            this.tag = t;
                        },
                        initData: function () {
                            t.showLoading({
                                title: '加载中'
                            });
                            this.fetchList().then(function (n) {
                                t.hideLoading();
                            });
                        },
                        fetchList: function () {
                            var that = this;
                            return (
                                !this.isLoading &&
                                ((this.isLoading = true),
                                this.$http('/renyis/'.concat(this.info.uuid, '/records'), 'GET', {
                                    page: this.page,
                                    per_page: this.perPage,
                                    tag: this.tag
                                })
                                    .then(function (n) {
                                        that.isInit = true;
                                        that.list = that.list.concat(n.data.list);
                                        console.log(n.data.list);
                                        that.isLoading = false;
                                        that.page++;
                                    })
                                    .catch(function (n) {
                                        that.isInit = false;
                                    }))
                            );
                        },
                        cancel: function () {
                            this.$emit('close');
                        }
                    },
                    onPageScroll: function (t) {}
                };
                n.default = e;
            }.call(this, e('543d').default));
        },
        '0861': function (t, n, e) {},
        '2c57': function (t, n, e) {
            'use strict';

            var i = e('0861');
            e.n(i).a;
        },
        '7fcb': function (t, n, e) {
            'use strict';

            e.d(n, 'b', function () {
                return o;
            });
            e.d(n, 'c', function () {
                return a;
            });
            e.d(n, 'a', function () {
                return i;
            });
            var i = {
                NoData: function () {
                    return e.e('components/NoData/NoData').then(e.bind(null, 'cafe'));
                }
            };
            var o = function () {
                var that = this;
                var n =
                    (that.$createElement,
                    that._self._c,
                    that.__map(that.list, function (n, e) {
                        return {
                            $orig: that.__get_orig(n),
                            g0: 'all' == that.tag || that.tag == n.level ? that.$tool.formatDate(n.created_at, 'MM/dd hh:mm:ss') : null
                        };
                    }));
                var e = !that.list.length && that.isInit;
                that.$mp.data = Object.assign(
                    {},
                    {
                        $root: {
                            l0: n,
                            g1: e
                        }
                    }
                );
            };
            var a = [];
        },
        '88ea': function (t, n, e) {
            'use strict';

            e.r(n);
            var i = e('7fcb');
            var o = e('cee8');
            for (var a in o) {
                if (['default'].indexOf(a) < 0) {
                    (function (t) {
                        e.d(n, t, function () {
                            return o[t];
                        });
                    })(a);
                }
            }
            e('2c57');
            var s = e('f0c5');
            var c = Object(s.a)(o.default, i.b, i.c, false, null, '5e04b9ce', null, false, i.a, void 0);
            n.default = c.exports;
        },
        cee8: function (t, n, e) {
            'use strict';

            e.r(n);
            var i = e('02a0');
            var o = e.n(i);
            for (var a in i) {
                if (['default'].indexOf(a) < 0) {
                    (function (t) {
                        e.d(n, t, function () {
                            return i[t];
                        });
                    })(a);
                }
            }
            n.default = o.a;
        }
    }
]);
(global.webpackJsonp = global.webpackJsonp || []).push([
    'pages/renyimen/components/RecordList-create-component',
    {
        'pages/renyimen/components/RecordList-create-component': function (t, n, e) {
            e('543d').createComponent(e('88ea'));
        }
    },
    [['pages/renyimen/components/RecordList-create-component']]
]);
</script>
<style>
@import './RecordList.css';
</style>
